package com.kongjs.application.config;

import com.kongjs.application.tenant.TenantRoleHierarchyInitializer;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@EnableScheduling
@Configuration
public class TaskConfig {

    @Resource
    private TenantRoleHierarchyInitializer tenantRoleHierarchyInitializer;

    //@Scheduled(fixedDelay = 60000)
    public void init() {
        tenantRoleHierarchyInitializer.initAllRoleHierarchy();
    }
}
